//
//  BSTDateFormat.swift
//  SwiftBaseTool
//
//  Created by taolei-mac on 2018/8/8.
//  Copyright © 2018年 taolei-mac. All rights reserved.
//

import Foundation

public enum BSTDateFormat {
    
    case commonDate, commonDateTime, commonYearMonth, commonTime, commonMonthDay, commonYear, commonMonth, commonDay, commonHourMinute, commonMinuteSecond, commonHour, commonMinute, commonSecond
    case cnDate, cnDateTime, cnDateYearMonth, cnDateMonthDay, cnTime, cnTimeHourMinute, cnTimeMinuteSecond
    case formatDate
    
    public func stringValue() -> String {
        switch self {
        case .commonDate:
            return "yyyy-MM-dd"
        case .commonDateTime:
            return "yyyy-MM-dd HH:mm:ss"
        case .commonYearMonth:
            return "yyyy-MM"
        case .commonTime:
            return "HH:mm:ss"
        case .commonHourMinute:
            return "HH:mm"
        case .commonMinuteSecond:
            return "mm:ss"
        case .commonMonthDay:
            return "MM-dd"
        case .commonYear:
            return "yyyy"
        case .commonMonth:
            return "MM"
        case .commonDay:
            return "dd"
        case .commonHour:
            return "HH"
        case .commonMinute:
            return "mm"
        case .commonSecond:
            return "ss"
        case .cnDate:
            return "yyyy年MM月dd日 HH时mm分ss秒"
        case .cnDateTime:
            return "yyyy年MM月dd日"
        case .cnDateYearMonth:
            return "yyyy年MM月"
        case .cnDateMonthDay:
            return "MM月dd日"
        case .cnTime:
            return "HH时mm分ss秒"
        case .cnTimeHourMinute:
            return "HH时mm分"
        case .cnTimeMinuteSecond:
            return "mm分ss秒"
        case .formatDate:
            return "yyyy-MM-dd'T'HH:mm:ssZZZZZ"
        }
    }
    
}
